package weekMatch.two_103;

import java.util.Arrays;

public class LeeCode_01 {
    public static void main(String[] args) {

    }
    private static int maximizeSum(int[] nums, int k) {
        int n = nums.length;
        Arrays.sort(nums);
        int max = nums[n - 1];
        int ans = 0;
        for (int i = 0; i < k; i++) {
            ans += max;
            max++;
        }
        return ans;
    }
}
